123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821 |
- <template>
- <div id="newsList">
- <!-- 页面头部 -->
- <HomePageHead></HomePageHead>
- <!-- 导航栏 -->
- <HomePageNavigation1></HomePageNavigation1>
- <!-- 列表页广告一 -->
- <HomeTopTen :imgurl="adList[0]" v-if="adList[0]"></HomeTopTen>
- <!-- 面包屑导航 -->
- <div class="breadcrumb">
- <div class="inner">
- <span class="location">当前位置:</span>
- <el-breadcrumb :separator-icon="ArrowRight">
- <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
- <el-breadcrumb-item :to="{ path: '/specialList/7' }">本网招聘</el-breadcrumb-item>
- </el-breadcrumb>
- </div>
- </div>
- <div class="projectMoreBox">
- <!-- <div class="projectMoreInfo">项目介绍</div> -->
- <div class="projectMoreTitle">社会保障在线网</div>
- <div class="projectMoreText">
- <p><b>政讯通·全国文化旅游项目</b>网络平台由<b>政讯通-全国政务信息一体化办公室</b>主管,联合30多家企事业单位组成,由北京政讯通文化传播有限公司对外牵头运营。</p>
- <p><b>政讯通·全国文化旅游项目</b>网络平台有政务、行业独立域名网站各<b>100</b>个和<b>4</b>个综合管理网站共<b>204</b>个网站,按照不同的行业和功能分类为用户提供大体系、广领域、全方位、全过程,有针对性的全国性文化旅游法制综合服务平台。
- </p>
- <p><b>政讯通·全国旅游资讯发布中心</b>是<b>政讯通·全国文化旅游项目</b>网络平台的4个综合管理网站之一,目前开设了栏目上千个,地市中心可全面覆盖我国334个地级市,<b>业务范围</b>涵盖旅游资讯、與情监测、法律咨询、旅游调研、法律宣传、群众监督、旅游安全等领域,日均会员访问量超过万次,累计完成文化旅游领域法制调研课题千余件,网络信息化会员遍布全国各地,实施<b>行业、区域</b>全覆盖,是我国具有广泛传播力、影响力的新型主流媒体。
- </p>
- </div>
- </div>
- <!-- 资讯列表 -->
- <div class="newsList">
- <div class="inner">
- <div class="innerLeft">
- <div class="innerTitle">本网招聘</div>
- <ul class="list">
- <li v-for="(item, index) in newsList" :key="index">
- <NuxtLink :to="item.linkurl" target="_blank" v-show="item.islink == 1">{{ item.title }}
- </NuxtLink>
- <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank"
- v-if="item.islink == 0">{{ item.list_title }}
- </NuxtLink>
- </li>
- </ul>
- <!-- 分页器 -->
- <div class="pagination">
- <el-pagination size="small" background layout="prev, pager, next" :total="total" class="mt-4"
- prev-text="上一页" next-text="下一页" @change="changePage" />
- <!-- <HomePagination @sendData="handleData"></HomePagination> -->
- </div>
- </div>
- <div class="innerRight">
- <!-- <DetailHotNews></DetailHotNews> -->
- <div class="rightMenuTitle">导航列表</div>
- <ul>
- <li v-for="(item, index) in bottomMenu" :key="index">
- <NuxtLink :to="`/speciaArticle/${item.id}`" target="_blank"
- v-if="item.id == pageId && item.id != 7" class="active">{{ item.name }}</NuxtLink>
- <NuxtLink :to="`/speciaArticle/${item.id}`" target="_blank"
- v-else-if="item.id != pageId && item.id != 7">{{ item.name }}</NuxtLink>
- <NuxtLink :to="`/specialList/${item.id}`" target="_blank"
- v-if="item.id == 7 && pageId == 7 && routeHref == '/specialList/7'" class="active">{{
- item.name }}
- </NuxtLink>
- <NuxtLink :to="`/specialList/${item.id}`" target="_blank" v-else-if="item.id == 7">{{
- item.name }}</NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 列表页广告二 -->
- <HomeTopTen :imgurl="adList[1]" v-if="adList[1]"></HomeTopTen>
- <!-- 资讯推荐 -->
- <!-- <div class="zixuntuijian">
- <div class="inner">
- <div class="innerLeft">
- <div class="zixunLeft">
- <div class="title">
- <h3>
- 资讯推荐
- </h3>
- </div>
- <ul class="photo_text">
- <li v-for="item in news1">
- <img :src="item.imgurl" alt="">
- <div>
- <h5>{{ item.title }}</h5>
- <p>
- <span>{{ item.author }}</span>
- <span>{{ item.created_at }}</span>
- </p>
- </div>
- </li>
- <li v-for="item in news11">
- <em></em>
- {{ item.title }}
- </li>
- </ul>
- </div>
- <div class="zixunRight">
- <div class="title">
- <h3>
- 资讯推荐
- </h3>
- </div>
- <ul class="photo_text">
- <li v-for="item in news2">
- <img :src="item.imgurl" alt="">
- <div>
- <h5>{{ item.title }}</h5>
- <p>
- <span>{{ item.author }}</span>
- <span>{{ item.created_at }}</span>
- </p>
- </div>
- </li>
- <li v-for="item in news22">
- <em></em>
- {{ item.title }}
- </li>
- </ul>
- </div>
- </div>
- <div class="innerRight">
- <div class="title">
- <h4>
- 热点资讯
- </h4>
- </div>
- <ul class="rightList">
- <li v-for="item in hotlistall">
- <img class="left" :src="item.imgurl">
- <p class="left">{{ item.title }}</p>
- </li>
- </ul>
- </div>
- </div>
- </div> -->
- <!-- 页面底部 -->
- <HomeFoot1></HomeFoot1>
- </div>
- </template>
- <script setup>
- import { onMounted } from 'vue';
- import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
- import { ArrowRight } from '@element-plus/icons-vue'
- const nuxtApp = useNuxtApp();
- const axios = nuxtApp.$axios;
- //获得跳转过来的id
- const route = useRoute();
- const pageId = route.params.id; //获得该页面的id
- console.log(pageId);
- const routeHref = route.href;
- //获得广告
- const adList = ref("");
- const aa = 'PAGE'
- const getadList = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
- adList.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- onMounted(() => {
- getadList()
- })
- // 定义响应式数据
- const seoData = ref({
- title: '三农资讯网',
- description: '默认描述',
- keywords: '默认关键词',
- image: 'https://example.com/default-image.jpg'
- });
- // 在 onMounted 钩子中获取数据
- onMounted(async () => {
- try {
- const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${articleId}`);
- const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
- console.log(seoData.value.title)
- // 更新 seoData
- seoData.value = {
- title: data.seo_title,
- description: data.seo_description,
- keywords: data.seo_keywords,
- image: data.seo_image
- };
- console.log(seoData.value.title)
- } catch (error) {
- console.error('获取 SEO 数据失败:', error);
- // 设置默认值
- seoData.value = {
- title: '三农资讯网',
- description: '默认描述',
- keywords: '默认关键词',
- image: 'https://example.com/default-image.jpg'
- };
- }
- });
- // 监听 seoData 的变化,动态设置 SEO 字段
- watch(seoData, (newVal) => {
- if (newVal.title) { // 确保 title 有值
- useSeoMeta({
- title: newVal.title, // 使用动态值
- description: newVal.description,
- ogTitle: newVal.title,
- ogDescription: newVal.description,
- ogImage: newVal.image,
- twitterTitle: newVal.title,
- twitterDescription: newVal.description,
- twitterImage: newVal.image,
- keywords: newVal.keywords
- });
- }
- }, { immediate: true });
- onMounted(() => {
- })
- let changePage = (value) => {
- console.log("当前页码", value);
- page.value = value
- console.log(page.value);
- newslists()
- }
- // 新闻列表
- const newsList = useState("newsList", () => '');
- const newslists = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteFooterCategoryList?fcat_id=${pageId}`);
- // console.log(response.data.rows);
- newsList.value = response.data;
- //total.value = response.data.count;
- } catch (error) {
- console.error(error);
- }
- }
- //获得底部导航
- const bottomMenu = ref([]);
- const getBottomMenu = async () => {
- const response = await axios.get(`/web/getWebsiteFooterCategory`);
- bottomMenu.value = response.data;
- }
- // //热点资讯
- // const hotlistall = useState("hotlistall", () => "");
- // const hotlist = async () => {
- // try {
- // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${2}&level=${4}&placeid=${1}`);
- // console.log('热点资讯', response.data);
- // for (let item of response.data) {
- // console.log(item);
- // item.count = 1;
- // }
- // hotlistall.value = response.data;
- // } catch (error) {
- // console.error(error);
- // }
- // }
- // //资讯推荐1
- // const news1 = useState("news1", () => "");
- // const newslist1 = async () => {
- // try {
- // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
- // console.log('热点资讯', response.data);
- // news1.value = response.data;
- // } catch (error) {
- // console.error(error);
- // }
- // }
- // const news11 = useState("news11", () => "");
- // const newslist11 = async () => {
- // try {
- // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
- // console.log('热点资讯', response.data);
- // news11.value = response.data;
- // } catch (error) {
- // console.error(error);
- // }
- // }
- // //资讯推荐2
- // const news2 = useState("news2", () => "");
- // const newslist2 = async () => {
- // try {
- // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
- // console.log('热点资讯', response.data);
- // news2.value = response.data;
- // } catch (error) {
- // console.error(error);
- // }
- // }
- // const news22 = useState("news22", () => "");
- // const newslist22 = async () => {
- // try {
- // const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
- // console.log('热点资讯', response.data);
- // news22.value = response.data;
- // } catch (error) {
- // console.error(error);
- // }
- // }
- //挂载成功钩子函数
- onMounted(() => {
- // 资讯推荐
- newslists()
- // 获得左侧导航
- getBottomMenu()
- // 热点资讯
- // hotlist()
- // // 资讯推荐
- // newslist1()
- // newslist2()
- // // 热点资讯
- // newslist11()
- // newslist22()
- })
- //路由中间件
- definePageMeta({
- middleware: 'auth'
- })
- </script>
- <style lang="less" scoped>
- //导航条
- .breadcrumb {
- width: 100%;
- height: 22px;
- margin-bottom: 30px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #666666;
- line-height: 23px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- :deep(.el-breadcrumb) {
- display: inline-block;
- vertical-align: -4px;
- }
- :deep(.el-breadcrumb__inner a),
- :deep(.el-breadcrumb__inner.is-link) {
- color: #666666;
- font-weight: 400;
- text-decoration: none;
- transition: var(--el-transition-color);
- }
- span {
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #666666;
- line-height: 23px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- span:hover {
- color: #666666;
- }
- .location {
- margin-right: 20px;
- width: 100px;
- height: 22px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #666666;
- line-height: 23px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- }
- // 资讯列表
- .newsList {
- width: 100%;
- height: 675px;
- margin-bottom: 70px;
- .inner {
- width: 1200px;
- .innerLeft {
- height: 65px;
- line-height: 65px;
- font-size: 22px;
- color: #028E21;
- font-weight: bold;
- }
- .innerTitle {
- font-size: 24px;
- }
- .innerLeft {
- height: 675px;
- float: right;
- >.list {
- height: 570px;
- margin-bottom: 70px;
- border-top: 1px solid #139602;
- >li {
- width: 790px;
- height: 60px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 60px;
- //border-bottom: 1px solid #D9D9D9;
- >a {
- width: 360px;
- height: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- line-height: 26px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- }
- >li:hover>a {
- color: #139602;
- }
- >li:nth-child(1)::after,
- >li:nth-child(2)::after {
- content: "热";
- margin-left: 13px;
- background: #FF8A37;
- color: #fff;
- font-size: 14px;
- padding: 0px 2px;
- }
- >li:nth-child(5n) {
- border-bottom: 1px solid #D9D9D9;
- }
- }
- >.pagination {
- width: 800px;
- height: 34px;
- margin-left: 141px;
- display: flex;
- justify-content: center;
- margin: 0;
- // 鼠标移入后字体颜色
- .el-pagination::v-deep :hover {
- color: #139609;
- }
- .el-pagination.is-background::v-deep .btn-next,
- .el-pagination.is-background::v-deep .btn-prev {
- width: 70px;
- height: 34px;
- margin: 0px 10px;
- border-radius: 4px;
- }
- .el-pagination.is-background::v-deep .el-pager li {
- margin: 0px 10px;
- width: 38px;
- height: 34px;
- border-radius: 4px;
- }
- .el-pagination.is-background::v-deep .btn-next.is-active,
- .el-pagination.is-background::v-deep .btn-prev.is-active,
- .el-pagination.is-background::v-deep .el-pager li.is-active {
- background-color: #028e21;
- color: #fff;
- }
- }
- }
- .innerRight {
- width: 279px;
- .rightMenuTitle {
- width: 279px;
- height: 69px;
- font-size: 22px;
- font-weight: bold;
- line-height: 58px;
- text-align: center;
- color: #fff;
- background: url("../../static/special/projectMoreTitle.png") no-repeat;
- margin-bottom: 30px;
- }
- ul {
- li {
- a {
- border-left: 5px solid #028E21;
- margin-bottom: 15px;
- font-size: 22px;
- display: block;
- height: 61px;
- line-height: 61px;
- color: #333333;
- text-align: center;
- background: #FBFBFB;
- }
- }
- }
- .active {
- border-left: 0;
- border: 1px solid #028E21;
- background: #fff;
- }
- }
- }
- }
- //资讯推荐
- .zixuntuijian {
- width: 100%;
- height: 290px;
- margin-bottom: 70px;
- .innerLeft {
- // 左侧
- .zixunLeft {
- margin-right: 30px;
- }
- .zixunRight,
- .zixunLeft {
- float: left;
- width: 380px;
- height: 290px;
- // 标题部分
- >.title {
- width: 380px;
- }
- >.title>h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- }
- >.title>h3>span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- .photo_text {
- >li:first-child {
- width: 380px;
- height: 120px;
- margin-top: 20px;
- margin-bottom: 15px;
- position: relative;
- >img {
- float: left;
- width: 160px;
- height: 120px;
- }
- >div {
- float: left;
- width: 220px;
- height: 120px;
- padding-left: 15px;
- padding-top: 6px;
- box-sizing: border-box;
- background-color: #f6f6f6;
- >h5 {
- width: 200px;
- height: 54px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 26px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >p {
- width: 200px;
- height: 22px;
- line-height: 20px;
- position: absolute;
- bottom: 5px;
- right: 0;
- >span {
- display: inline-block;
- // width: 100px;
- height: 18px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 400;
- font-size: 12px;
- color: #999999;
- text-align: left;
- line-height: 14px;
- font-style: normal;
- text-transform: none;
- }
- >span:last-child {
- // width: 90px;
- text-align: right;
- margin-left: 20px;
- }
- }
- }
- }
- >li {
- width: 380px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-bottom: 10px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- margin-right: 10px;
- background-color: #d9d9d9;
- }
- }
- >li:hover {
- color: #139602;
- }
- >li:hover em {
- background-color: #139602;
- }
- }
- }
- }
- .innerRight {
- width: 381px;
- height: 290px;
- background-color: #fbfbfb;
- >.title {
- width: 380px;
- height: 40px;
- line-height: 40px;
- border-top: 1px solid #139602;
- border-bottom: 1px solid #e7e7e7;
- >h4 {
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- margin-left: 20px;
- font-size: 20px;
- color: #000000;
- text-align: left;
- font-style: normal;
- text-transform: none;
- >span {
- float: right;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 14px;
- margin-right: 10px;
- color: #999999;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- }
- }
- .rightList {
- height: 540px;
- margin-top: 20px;
- >li {
- height: 100px;
- margin-bottom: 10px;
- >img {
- width: 150px;
- height: 100px;
- }
- >p {
- width: 219px;
- height: 100px;
- padding-left: 12px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 16px;
- color: #333333;
- line-height: 22px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >p:hover {
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- }
- }
- }
- }
- }
- .projectMoreBox {
- width: 1200px;
- margin: 0 auto;
- height: 452px;
- margin-top: 20px;
- background: url("../../static/special/projectMoreBg.png") no-repeat;
- margin-bottom: 40px;
- .projectMoreTitle {
- color: #028E21;
- padding-top: 45px;
- font-size: 26px;
- padding-left: 204px;
- }
- .projectMoreText {
- padding: 40px;
- font-size: 20px;
- color: #333333;
- text-indent: 2em;
- line-height: 36px;
- }
- }
- </style>
|